//==============================================================================
// CLibraryAdditions.hh
// ----------------------------------------------------------------------------
//
//------------------------------------------------------------------------------
// $Id: CLibraryAdditions.hh,v 1.1 2000/03/31 19:32:19 kdurbin Exp kdurbin $
//------------------------------------------------------------------------------
//
// $Log: CLibraryAdditions.hh,v $
// Revision 1.1  2000/03/31 19:32:19  kdurbin
// Initial revision
//
//
//==============================================================================
//.......1.........2.........3.........4.........5.........6.........7.........8
//


#include "LocalSTL.hh"
#include <stdarg.h>

#ifndef _CLIBRARYADDITIONS
#define _CLIBRARYADDITIONS

// Why 64K?  Well, because users will at least have a suspicion that there
// might be a limit at 32K, 64K, and so on.  At least that's one thought. 
// 64K is also pretty big for a single string or single line.  You might
// create a bigger string or line, but if you do, it is likely that you 
// will wonder if it's too big, so when there is a probelm you won't be 
// totally mystified like you would be if the size were 2K.  Why not make
// it true dynamic allocation?  Well, that's slow, and more coding and 
// doesn't happen often enough now (which is to say never) to make it 
// worth the effort/time. 
#define STRING_BUFFER_SIZE 65535
//#define READ_BUFFER_SIZE 65535
#define READ_BUFFER_SIZE 300000

extern char readbuf[];


//--------------------------
//* CLibraryAdditions
//--------------------------
// These functions are things that I feel are missing from the C/C++ standard
// libraries or that weren't updated to include C++ types like strings. 
// Since the C-language functions are familiar, I'm giving these the 
// same names.  This is potentially very confusing to debug if someone 
// thinks these functions are part of the C/C++ standard libraries, so I may 
// have to rethink this.   At least by putting them here together, there is a 
// better chance that someone trying to track down a problem will realize that 
// these functions are locally defined, and not in the standard library. 
//
//


// string version of common conversion functions
string itostring(int num);
string ftostring(float num);
string itoa(int num);
string ftoa(float num);

string ftoa(float num,string fmt);

int  atoi(string &s);


void sprintf(int MaxSize,string &outString,const char*fmt,...);

bool GetLine(istream &theFile,string &theLine);

#endif




